Skip to content

fix(consensus): reject execution WebSocket endpoint with IPC - #337

Open
Kewe63 wants to merge 1 commit into
circlefin:mainfrom
Kewe63:fix-ipc-execution-ws-conflict
Open

fix(consensus): reject execution WebSocket endpoint with IPC#337
Kewe63 wants to merge 1 commit into
circlefin:mainfrom
Kewe63:fix-ipc-execution-ws-conflict

Conversation

@Kewe63

@Kewe63 Kewe63 commented Sep 4, 2026

Copy link
Copy Markdown

Summary

Fixes #338

Reject consensus CLI configurations that combine IPC transport options with --execution-ws-endpoint.

The WebSocket endpoint is an RPC transport option, but it was omitted from the IPC/RPC conflict check. As a result, a complete IPC configuration could be accepted together with an execution WebSocket endpoint, after which the IPC configuration took precedence and the explicitly supplied WebSocket endpoint was silently ignored.


Problem

StartCmd::validate() classifies these fields as RPC options when checking for conflicts with IPC:

  • --eth-rpc-endpoint
  • --execution-endpoint
  • --execution-jwt

However, it omitted:

  • --execution-ws-endpoint

This was inconsistent with the later uses_rpc_transport check, which already treats execution_ws_endpoint as an RPC transport option.

When both IPC sockets and --execution-ws-endpoint were configured:

  1. CLI validation succeeded.
  2. StartConfig::engine_config() selected EngineConfig::Ipc.
  3. The supplied WebSocket endpoint was not used.
  4. The node could start with an explicit configuration value silently ignored.

Changes

  • Include execution_ws_endpoint in the RPC option set used by the IPC/RPC conflict validation.
  • Include --execution-ws-endpoint in the conflict error's list of RPC options.
  • Add a regression test covering a complete IPC configuration combined with an explicit execution WebSocket endpoint.

Regression Coverage

The new test configures:

--eth-socket /tmp/reth.ipc
--execution-socket /tmp/reth-auth.ipc
--execution-ws-endpoint

and verifies that:

  • validation rejects the configuration;
  • the error reports an IPC/RPC conflict;
  • the error identifies --execution-ws-endpoint as an RPC option.

The regression test was confirmed to fail against the previous implementation before the validation fix was applied.


How to Test

cargo +1.94.0 test
-p arc-node-consensus-cli
validate_err_when_mixing_ipc_and_execution_ws_endpoint
-- --nocapture

Result:

1 passed; 0 failed

Full affected package:

cargo +1.94.0 test -p arc-node-consensus-cli

Result:

89 passed; 0 failed

Additional checks:

cargo +1.94.0 fmt -p arc-node-consensus-cli -- --check
cargo +1.94.0 clippy -p arc-node-consensus-cli --all-targets -- -D warnings
git diff --check

All checks passed.


Scope and Risk

This is limited to CLI validation and its regression coverage.

It does not change:

  • IPC connection behavior;
  • RPC connection behavior;
  • WebSocket endpoint derivation;
  • EngineConfig construction;
  • consensus or protocol behavior.

Existing valid IPC-only and RPC-only configurations are unaffected.


Duplicate Check

Open and closed issues and pull requests were searched using the affected flag names, transport combinations, and conflict message. No direct duplicate or existing implementation was found.

Issue #294 and PR #295 concern separated-host deprecation wording and do not address this validation gap.


Checklist

  • The bug was reproduced on current main.
  • A regression test was added and proven to fail before the fix.
  • The implementation is limited to the affected validation path.
  • Focused and package tests pass.
  • Formatting and Clippy checks pass.
  • No protocol, persistence, API, or dependency changes are included.
  • The change was reviewed independently.
  • Follows Conventional Commits

Impact

Type: 🐛 Bug fix
Fixes: #338

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consensus CLI should reject execution WebSocket endpoints when IPC transport is selected

1 participant